var txtMsn = this.getItem('txtMsn');
txtMsn.setReadOnly(true);

var me = this;
var vals = me.getItem('frmOper').getValues();

YX.ZbusRpc.request({
    module: 'SmfrSaveMsnForMsnRequestService',
    showSuccess: false,
    showFail: false,
    params: vals,
    failure: function(rsp) {
        me.getItem('dspMsg').setValue(rsp.rspDesc);
    },
    success: function(rsp) {
        me.getItem('dspMsg').setValue(rsp.rspDesc);
    },
    callback: function(options, rspSuccess, rsp) {
        if (rspSuccess) {
            var vWhName = me.getItem('cmbWhCode').getStore().findRecord('whCode', vals.whCode).get('whName');

            me.getItem('grdScanResult').getStore().insert(0, {
                scanTime: Ext.Date.format(new Date(), "H:i:s"),
                mo: vals.mo,
                whName: vWhName,
                matCode: rsp.rspCode == "SYS-0000" ? rsp.msnSts.matCode: "",
                matDesc: rsp.rspCode == "SYS-0000" ? rsp.msnSts.matDesc: "",
                ioType: vals.ioType == 'I' ? '退库': '出库',
                msn: vals.msn,
                qty: rsp.rspCode == "SYS-0000" ? rsp.msnSts.qty: 0,
                result: rsp.rspCode == "SYS-0000" ? '成功': '失败',
                resultText: rsp.rspCode == "SYS-0000" ? "": rsp.rspDesc
            });
        }

        txtMsn.setReadOnly(false);
        txtMsn.setValue('');
        txtMsn.focus();
    }
});